////////////////////////////////////////////////////////////////////////////////////////////////////
/// Copyright (c) 2009 - 2010 RacoonStudios
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this
/// software and associated documentation files (the "Software"), to deal in the Software
/// without restriction, including without limitation the rights to use, copy, modify, merge,
/// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
/// to whom the Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in all copies or
/// substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
/// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
/// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
/// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
/// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS IN THE SOFTWARE.
////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once
#ifndef point4_h__
#define point4_h__

#include "math/float4.h"
#include "math/vector4.h"
#include "math/vector3.h"

namespace Math
{

	////////////////////////////////////////////////////////////////////////////////////////////////////
	/// \class	point4
	///
	/// \brief	Point 4. 
	///
	/// \author	khaos
	/// \date	21.12.2009
	////////////////////////////////////////////////////////////////////////////////////////////////////
	class point4 : public float4
	{
	public:

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	public: point4()
		///
		/// \brief	Point 4. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		////////////////////////////////////////////////////////////////////////////////////////////////////
		point4();

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	point4(scalar x, scalar y, scalar z)
		///
		/// \brief	Constructor. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	x	The x coordinate. 
		/// \param	[in]	y	The y coordinate. 
		/// \param	[in]	z	The z coordinate. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		point4(scalar x, scalar y, scalar z);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	point4(const float4 & rhs)
		///
		/// \brief	Constructor. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		point4(const float4 & rhs);




		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void operator= (const point4 & rhs)
		///
		/// \brief	Copy operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void operator = (const point4 & rhs);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void operator= (const float4 & rhs)
		///
		/// \brief	Copy operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void operator = (const float4 & rhs);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	bool operator== (const point4 & rhs) const
		///
		/// \brief	Equality operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	True if both point4 are equal, otherwise false.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		bool operator == (const point4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	bool operator== (const float4 & rhs) const
		///
		/// \brief	Equality operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	True if both point4 and float4 are equal, otherwise false.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		bool operator == (const float4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	bool operator!= (const point4 & rhs) const
		///
		/// \brief	Inequality operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	True if both point4 are inequal, otherwise false.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		bool operator != (const point4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	bool operator!= (const float4 & rhs) const
		///
		/// \brief	Inequality operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	True if both point4 and float4 are inequal, otherwise false.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		bool operator != (const float4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void operator+= (const vector4 & rhs)
		///
		/// \brief	Assignment by addition operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void operator += (const vector4 & rhs);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void operator-= (const vector4 & rhs)
		///
		/// \brief	Assignment by subtraction operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void operator -= (const vector4 & rhs);

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	vector4 operator+ (const point4 & rhs) const
		///
		/// \brief	Addition operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	The resulting vector4.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		vector4 operator + (const point4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	vector4 operator- (const point4 & rhs) const
		///
		/// \brief	Negation operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	The resulting vector4.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		vector4 operator - (const point4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	point4 operator+ (const vector4 & rhs) const
		///
		/// \brief	Addition operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	The new position of the point4.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		point4 operator + (const vector4 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	point4 operator+ (const vector3 & rhs) const
		///
		/// \brief	Addition operator. 
		///
		/// \author	Markus
		/// \date	06.02.2010
		///
		/// \param	rhs	The right hand side. 
		///
		/// \return	The result of the operation. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		point4 operator + (const vector3 & rhs) const;

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	point4 operator- (const vector4 & rhs) const
		///
		/// \brief	Negation operator. 
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	rhs	The right hand side object. 
		///
		/// \return	The new position of the point4.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		point4 operator - (const vector4 & rhs) const;




		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	void set(scalar x, scalar y, scalar z)
		///
		/// \brief	Sets all 3 coordinates of the point4.
		///			As you might know the fourth coordinate is always 1.
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \param	[in]	x	The x coordinate. 
		/// \param	[in]	y	The y coordinate. 
		/// \param	[in]	z	The z coordinate. 
		////////////////////////////////////////////////////////////////////////////////////////////////////
		void set(scalar x, scalar y, scalar z);







		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	static point4 origin()
		///
		/// \brief	Returns an object of the origin point4.
		///
		/// \author	khaos
		/// \date	21.12.2009
		///
		/// \return	The origin point4.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		static point4 origin();

	protected:

	private:

	};

}

#endif // point4_h__